From: Florian Müllner Date: Mon, 4 Mar 2013 15:22:16 +0000 (+0100) Subject: shellEntry: Disable copy action for password entries X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4568 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9e31f05861e95cd48020a7b5f1573bd5b7c17c34;p=gnome-shell.git shellEntry: Disable copy action for password entries Curently it is possible to copy the content of password entries, and paste it elsewhere in clear text. This is undesirable, so follow GTK+'s behavior and disable the copy action for password entries. https://bugzilla.gnome.org/show_bug.cgi?id=695104 --- diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index b71c809f1..61e43a9e3 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -89,7 +89,8 @@ const EntryMenu = new Lang.Class({ _updateCopyItem: function() { let selection = this._entry.clutter_text.get_selection(); - this._copyItem.setSensitive(selection && selection != ''); + this._copyItem.setSensitive(!this._entry.clutter_text.password_char && + selection && selection != ''); }, _updatePasteItem: function() {